CREATE EXTERNAL TABLE jms_dm.dm_lmdm_three_segment_monitoring_dt(
	site_name string COMMENT '网点名称',
	site_code string COMMENT '网点code',
	sign_scantime timestamp COMMENT '签收时间',
	deliver_agent_name string COMMENT '代理区名称',
	deliver_agent_code string COMMENT '代理区code',
	provider_id string COMMENT '省份ID',
    provider_desc string COMMENT '省份',
    city_id string COMMENT '城市id',
    city_desc string COMMENT '城市',
    all_total_num bigint COMMENT 'total_签收总票数',
    all_analysis_num bigint COMMENT 'total_解析票数',
    all_analysis_true_num bigint COMMENT 'total_解析准确票数',
	jms_total_num bigint COMMENT 'jms_签收总票数',
    jms_analysis_num bigint COMMENT 'jms_解析票数_',
    jms_analysis_true_num bigint COMMENT 'jms_解析准确票数',
	thd_total_num bigint COMMENT '桃花岛_签收总票数',
    thd_analysis_num bigint COMMENT '桃花岛_解析票数_',
    thd_analysis_true_num bigint COMMENT '桃花岛_解析准确票数',
	thd_own_num	 bigint COMMENT '桃花岛_自研票数',
    thd_own_num_passive	 bigint COMMENT '桃花岛_自研票数预留字段',
	qxt_total_num bigint COMMENT '七星潭_签收总票数',
    qxt_analysis_num bigint COMMENT '七星潭_解析票数_',
    qxt_analysis_true_num bigint COMMENT '七星潭_解析准确票数',
	qxt_own_num	 bigint COMMENT '七星潭_自研票数',
    qxt_own_num_passive	 bigint COMMENT '七星潭_自研票数预留字段',
	segment_type int COMMENT '一段码，二段码，三段码',
	etl_time string COMMENT '入仓时间'
 )
COMMENT '三段码解析监控'
PARTITIONED BY (dt string COMMENT '签收时间')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dm.db/external/dm_lmdm_three_segment_monitoring_dt'
TBLPROPERTIES (
          'discover.partitions' = 'false',
          'parquet.column.index.access' = 'true'
          );



          --2023.3.20新增字段
alter table bidefault.dm_lmdm_three_segment_monitoring_dt add columns(     zjs_total_num bigint COMMENT '七星潭_签收总票数',
                                                                        zjs_analysis_num bigint COMMENT '七星潭_解析票数_',
                                                                        zjs_analysis_true_num bigint COMMENT '七星潭_解析准确票数'
                                                                    ) cascade


alter table jms_dm.dm_lmdm_three_segment_monitoring_dt add column (     zjs_total_num bigint COMMENT '七星潭_签收总票数',
                                                                        zjs_analysis_num bigint COMMENT '七星潭_解析票数_',
                                                                        zjs_analysis_true_num bigint COMMENT '七星潭_解析准确票数'
                                                                        )  ;